<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理系统</title>
<link href="../CSS/form.css" rel="stylesheet" type="text/css" />
<link href="../CSS/validate/main.css" rel="stylesheet" type="text/css" />
<link href="../CSS/login.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-1.10.1.js"></script>
<script type="text/javascript" src="../js/jquery.validate.js"></script>
<script type="text/javascript">
	$(function(){
		$("#addForm").validate({
			onkeyup:false,
			rules:{
			},
			messages:{
				
			},
			errorElement:"span",
			errorClass:"errorContainer"
		});
	});
</script>
<script type="text/javascript">
	function really(){
		if(confirm('确定删除吗？')) {
			return true;
		} else {
			return false;
		}
	}
	</script>
</head>

<body>
	<div id="right">
		<div id="right_t">
			<div id="right_t_l"></div>
			<div id="right_t_r"></div>
			<div id="right_t_c"></div>
		</div>
		<div id="right_c">
			<div id="right_c_l"></div>
			<div id="right_c_r"></div>
			<div id="right_c_c">
				<?php
				require_once '../utils/common.php';
				require_once '../bgService/Page.class.php';
				require_once '../bgService/PagerService.class.php';
				checkUserValidate ();
				$page = new Page ();
				$fatherid = $_REQUEST['id'];
				$arr = array('id'=>$fatherid);
				$page->params = $arr;
				?>
				<div id="title"><span><a href="AddTel.php?fatherid=<?=$fatherid?>" class="xz">添加电话</a> </span>电话列表管理</div>
              <?php
														require_once '../utils/common.php';
														require_once '../bgService/Page.class.php';
														require_once '../bgService/PagerService.class.php';
														$service = new PagerService ();
														$page->gotoUrl = "TelManager.php";
														if (! empty ( $_GET ['pageNow'] )) {
															$page->pageNow = $_GET ['pageNow'];
														}
														$service->getTelPage($page,$fatherid) ;
														if ($page->rowCount == 0) {
															echo "暂无数据";
														} else {
															?>
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr class="table_h">
						<td align="center" valign="middle">id</td>
						<td align="center" valign="middle">名字</td>
						<td align="center" valign="middle">电话</td>
						<td align="center" valign="middle">操作</td>
					</tr>
					<?php
															require_once '../Config.php';
															for($i = 0; $i < count ( $page->data ); $i ++) {
																$data = $page->data [$i];
																?>
					<tr>
						<td align="center" valign="middle"><?=$data['id']?></td>
						<td align="center" valign="middle"><?=$data['name']?></td>
						<td align="center" valign="middle"><?=$data['tel']?></td>
						<td align="center" valign="middle"><a
							href="TelProcess.php?type=del&id=<?=$data['id']?>&fatherid=<?=$fatherid?>"
							onclick="return really()">删除</a>
							<a
							href="UpdateTel.php?id=<?=$data['id']?>&fatherid=<?=$fatherid?>">修改</a>
							</td>
					</tr>
					<?php
															}
															?>
				</table>
				<?php
														}
														?>
				<div id="fy"><?=$page->navigator?></div>
			</div>
		</div>
	</div>
</body>

</html>